import request from '@/utils/request'
import { get } from 'js-cookie'

const api_name = `/api/user/patient/auth`

export default {
        //就诊人列表
       findAll(){
           return request({
               url:`${api_name}/findAll`,
               method:`get`,
           })
       },
       //添加就诊人信息
       save(patient){
           return request({
               url:`${api_name}/save`,
               method:`post`,
               data:patient
           })
       },
       //根据id获取就诊人信息
       getPatient(id){
           return request({
               url:`${api_name}/get/${id}`,
               method:`get`
           })
       },
       //修改就诊人信息
       updatePatient(patient){
        return request({
            url:`${api_name}/update`,
            method:`post`,
            data:patient
        })
       },
       //根据id删除就诊人信息
       deletePatient(id){
           return request({
               url:`${api_name}/remove/${id}`,
               method:`delete`
           })
       }

}